package com.demo.druid.base.response;

import lombok.Data;
import lombok.Getter;
import lombok.Setter;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

/**
 * @author wangjianhua
 * @Description
 * @date 2021/9/1/001 18:13
 **/
@Getter
@Setter
public class ResList<T> {

    private List<T> list= new ArrayList<T>();

    private int total;

    public ResList(List<T> list, int total) {
        this.list = list;
        this.total = total;
    }

    public ResList(List<T> list) {
        this.list = list;
    }

    @Override
    public String toString() {
        return "ResList{" +
                "list=" + Arrays.toString(new List[]{list}) +
                ", total=" + total +
                '}';
    }
}
